
function getE(name) {
    if (document.getElementById)
        var elem = document.getElementById(name);
    else if (document.all)
        var elem = document.all[name];
    else if (document.layers)
        var elem = document.layers[name];
    return elem;
}

function OpenWindow(query, w, h, scroll) {
    var l = (screen.width - w) / 2;
    var t = (screen.height - h) / 2;

    winprops = 'resizable=0, height=' + h + ',width=' + w + ',top=' + t + ',left=' + l + 'w';
    if (scroll) winprops += ',scrollbars=1';
    var f = window.open(query, "_blank", winprops);
}

function setLocation(url) {
    window.location.href = url;
}

function checkCostumeSize() {
    var flag = true;
    var chooseValueCostume = $("#chooseSize").find("select").eq(0).find("option:selected").text();
    var chooseValueShoe = $("#chooseSize").find("select").eq(1).find("option:selected").text();
    if (chooseValueCostume.toString() == "Select") {
        alert('Please Choose The Costume Size!');
        flag = false;
        return flag;

    }

    if (chooseValueShoe != null || chooseValueShoe != NaN) {
        if (chooseValueShoe.toString() == "Select") {
            alert('Please Choose The Shoe Size!');
            flag = false;
            return flag;
        }
    }

    return flag;
}
/*not use*/
function checkRequired() {
    var flag = true;
    var alertMsg = "";
    $(".attributes .attr:visible .attrItem .isRequired").each(function () {
        var value = $(this).parent().find(":input").val();
        if ($.trim(value) == "" || $.trim(value) == "0") {
            var textprompt = $(this).parent().find(".textprompt").text();
            alertMsg = alertMsg + textprompt + " is required. \n";
            flag = false;
        }
    });

    if (!flag) {
        alert(alertMsg);
    }
}